@layout("/common/_container.html"){
<div class="ibox-content">
    <div style="display: none">
        <input type="hidden" id="customerId" value="${customerId}">
        <input type="hidden" id="getTime" value="${getTime}">
        <input type="hidden" id="oldDocumentNumber" value="${rechargeInfo.documentNumber}">
        <input type="hidden" id="customerName" value="${customerInfo.customerName}">
    </div>
    <div id="Div2">
        <div>
            门诊：${customerInfo.arrivalStore}&nbsp
            姓名：${customerInfo.customerName}&nbsp
            性别：${customerInfo.sex}&nbsp
            年龄：${customerInfo.customerAge}&nbsp
            电话：${customerInfo.customerPhone}&nbsp
        </div>
    </div><br><br>
    <div class="clearfix divBox">
        <div class="col-sm-12">
            <div class="col-sm-4" style="text-align: right"><span>请输入单据号*</span></div>
            <div class="col-sm-8"><input type="text" class="selecteds" id="documentNumber" value="${rechargeInfo.documentNumber}"></div>
        </div>
        <div class="btn_box col-sm-12">
            <div class="col-sm-4"></div>
            <div class="col-sm-8">
                <button type="button" class="btn" id="submit">提交</button>
                <button type="button" class="btn" onclick="cancel()">取消</button>
            </div>
        </div>
    </div>
</div>
<script>
    /**
     * 点击挂号
     */
    submit.onclick = function () {
        var documentNumber=document.getElementById("documentNumber").value;
        var customerName=document.getElementById("customerName").value;
        if(documentNumber==null||documentNumber==""){
            alert("请输入单据号！");
            return;
        }
        if(confirm("确定患者【"+customerName+"】的单据号?")) {
            $.ajax({
                url: Feng.ctxPath + "/recharge/updateDocumentNumber",
                type: "post",
                data: {
                    getTime: document.getElementById("getTime").value,
                    oldDocumentNumber: document.getElementById("oldDocumentNumber").value,
                    documentNumber: document.getElementById("documentNumber").value,
                    customerId: document.getElementById("customerId").value
                },
                success: function (data) {
                    Feng.success('修改单号成功！');
                    window.parent.Recharge.table.refresh();
                    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                    parent.layer.close(index);
                },
                error: function (data) {
                    alert('内部故障!');
                }
            });
        }
    }

    function cancel() {
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
        parent.layer.close(index);
    }
</script>
@}
<style>
    .selecteds {
        width: 50%;
        height: 39px
    }

    .divBox > div {
        margin-bottom: 20px;
    }

    ul {
        margin: 0;
        padding: 0;
    }

    input {
        border: 1px solid #a9a9a9;
        border-radius: 3px;
    }

    .ul_li > li {
        float: left;
        margin-right: 3%;
        margin-bottom: 15px;
    }

    .ul_li label {
        padding-right: 9px;
    }

    .records > li {
        color: white;
        cursor: pointer;
        float: left;
        margin-right: 3%;
    }

    .btn_box button {
        margin: 0;
        color: white;
        background: #2eadd0;
        padding: 6px 30px;
        font-size: 1em;
    }

    .records > li > span {
        font-weight: bolder;
    }
</style>
